home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / ime.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  6.9 KB  |  251 lines

  1. /*++ BUILD Version: 0003    // Increment this if a change has global effects
  2.  
  3. Copyright (c) 1985-1996, Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     ime.h
  8.  
  9. Abstract:
  10.  
  11.     Procedure declarations, constant definitions and macros for the IME
  12.     component.
  13.  
  14. --*/
  15.  
  16. #ifndef _IME_
  17. #define _IME_
  18. #pragma option push -b
  19.  
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif /* __cplusplus */
  24.  
  25. #ifdef __BORLANDC__
  26. #  include <pshpack8.h>
  27. #endif
  28.  
  29. #ifndef _WINDEF_
  30. typedef unsigned int UINT;
  31. #endif // _WINDEF_
  32.  
  33. #define IME_MAXPROCESS 32
  34.  
  35. LRESULT WINAPI SendIMEMessageExA(HWND, LPARAM);
  36. LRESULT WINAPI SendIMEMessageExW(HWND, LPARAM);
  37. #ifdef UNICODE
  38. #define SendIMEMessageEx  SendIMEMessageExW
  39. #else
  40. #define SendIMEMessageEx  SendIMEMessageExA
  41. #endif // !UNICODE
  42.  
  43. //
  44. // IMESTRUCT structure for SendIMEMessageEx
  45. //
  46. typedef struct tagIMESTRUCT {
  47.     UINT     fnc;        // function code
  48.     WPARAM   wParam;     // word parameter
  49.     UINT     wCount;     // word counter
  50.     UINT     dchSource;  // offset to Source from top of memory object
  51.     UINT     dchDest;    // offset to Desrination from top of memory object
  52.     LPARAM   lParam1;
  53.     LPARAM   lParam2;
  54.     LPARAM   lParam3;
  55. } IMESTRUCT,*PIMESTRUCT,NEAR *NPIMESTRUCT,FAR *LPIMESTRUCT;
  56.  
  57.  
  58.  
  59. #define CP_HWND                 0
  60. #define CP_OPEN                 1
  61. #define CP_DIRECT               2
  62. #define CP_LEVEL                3
  63.  
  64.  
  65. //
  66. //      Virtual Keys
  67. //
  68.  
  69. #define VK_DBE_ALPHANUMERIC              0x0f0
  70. #define VK_DBE_KATAKANA                  0x0f1
  71. #define VK_DBE_HIRAGANA                  0x0f2
  72. #define VK_DBE_SBCSCHAR                  0x0f3
  73. #define VK_DBE_DBCSCHAR                  0x0f4
  74. #define VK_DBE_ROMAN                     0x0f5
  75. #define VK_DBE_NOROMAN                   0x0f6
  76. #define VK_DBE_ENTERWORDREGISTERMODE     0x0f7
  77. #define VK_DBE_ENTERIMECONFIGMODE        0x0f8
  78. #define VK_DBE_FLUSHSTRING               0x0f9
  79. #define VK_DBE_CODEINPUT                 0x0fa
  80. #define VK_DBE_NOCODEINPUT               0x0fb
  81. #define VK_DBE_DETERMINESTRING           0x0fc
  82. #define VK_DBE_ENTERDLGCONVERSIONMODE    0x0fd
  83.  
  84.  
  85.  
  86. //
  87. //     switch for wParam of IME_SETCONVERSIONWINDOW
  88. //
  89. #define MCW_DEFAULT             0x00
  90. #define MCW_RECT                0x01
  91. #define MCW_WINDOW              0x02
  92. #define MCW_SCREEN              0x04
  93. #define MCW_VERTICAL            0x08
  94. #define MCW_HIDDEN              0x10
  95.  
  96. //
  97. //    switch for wParam of IME_SETCONVERSIONMODE
  98. //       and IME_GETCONVERSIONMODE
  99. //
  100. #define IME_MODE_ALPHANUMERIC   0x0001
  101.  
  102. #ifdef KOREA    // BeomOh - 9/29/92
  103. #define IME_MODE_SBCSCHAR       0x0002
  104. #else
  105. #define IME_MODE_SBCSCHAR       0x0008
  106. #endif
  107.  
  108. #define IME_MODE_KATAKANA       0x0002
  109. #define IME_MODE_HIRAGANA       0x0004
  110. #define IME_MODE_HANJACONVERT   0x0004
  111. #define IME_MODE_DBCSCHAR       0x0010
  112. #define IME_MODE_ROMAN          0x0020
  113. #define IME_MODE_NOROMAN        0x0040
  114. #define IME_MODE_CODEINPUT      0x0080
  115. #define IME_MODE_NOCODEINPUT    0x0100
  116. //
  117. //
  118.  
  119. //
  120. //     IME APIs
  121. //
  122. #define IME_GETIMECAPS            0x03
  123. #define IME_SETOPEN               0x04
  124. #define IME_GETOPEN               0x05
  125. #define IME_GETVERSION            0x07
  126. #define IME_SETCONVERSIONWINDOW   0x08
  127. #define IME_MOVEIMEWINDOW         IME_SETCONVERSIONWINDOW       // KOREA only
  128. #define IME_SETCONVERSIONMODE     0x10
  129.  
  130. #define IME_GETCONVERSIONMODE     0x11
  131. #define IME_SET_MODE              0x12          // KOREA only
  132. #define IME_SENDVKEY              0x13
  133. #define IME_ENTERWORDREGISTERMODE 0x18
  134. #define IME_SETCONVERSIONFONTEX   0x19
  135.  
  136.  
  137. //
  138. // IME_CODECONVERT subfunctions
  139. //
  140. #define IME_BANJAtoJUNJA        0x13            // KOREA only
  141. #define IME_JUNJAtoBANJA        0x14            // KOREA only
  142. #define IME_JOHABtoKS           0x15            // KOREA only
  143. #define IME_KStoJOHAB           0x16            // KOREA only
  144.  
  145. //
  146. // IME_AUTOMATA subfunctions
  147. //
  148. #define IMEA_INIT               0x01            // KOREA only
  149. #define IMEA_NEXT               0x02            // KOREA only
  150. #define IMEA_PREV               0x03            // KOREA only
  151.  
  152. //
  153. // IME_HANJAMODE subfunctions
  154. //
  155. #define IME_REQUEST_CONVERT     0x01            // KOREA only
  156. #define IME_ENABLE_CONVERT      0x02            // KOREA only
  157.  
  158. //
  159. // IME_MOVEIMEWINDOW subfunctions
  160. //
  161. #define INTERIM_WINDOW          0x00            // KOREA only
  162. #define MODE_WINDOW             0x01            // KOREA only
  163. #define HANJA_WINDOW            0x02            // KOREA only
  164.  
  165. //
  166. //    error code
  167. //
  168. #define IME_RS_ERROR            0x01    // genetal error
  169. #define IME_RS_NOIME            0x02    // IME is not installed
  170. #define IME_RS_TOOLONG          0x05    // given string is too long
  171. #define IME_RS_ILLEGAL          0x06    // illegal charactor(s) is string
  172. #define IME_RS_NOTFOUND         0x07    // no (more) candidate
  173. #define IME_RS_NOROOM           0x0a    // no disk/memory space
  174. #define IME_RS_DISKERROR        0x0e    // disk I/O error
  175. #define IME_RS_INVALID          0x11    // Win3.1/NT
  176. #define IME_RS_NEST             0x12    // called nested
  177. #define IME_RS_SYSTEMMODAL      0x13    // called when system mode
  178.  
  179. //
  180. //   report messge from IME to WinApps
  181. //
  182. #define WM_IME_REPORT       0x0280
  183.  
  184. //
  185. //   report message parameter for WM_IME_REPORT
  186. //
  187. #define IR_STRINGSTART      0x100
  188. #define IR_STRINGEND        0x101
  189. #define IR_OPENCONVERT      0x120
  190. #define IR_CHANGECONVERT    0x121
  191. #define IR_CLOSECONVERT     0x122
  192. #define IR_FULLCONVERT      0x123
  193. #define IR_IMESELECT        0x130
  194. #define IR_STRING       0x140
  195. #define IR_DBCSCHAR             0x160
  196. #define IR_UNDETERMINE          0x170
  197. #define IR_STRINGEX             0x180   // New for 3.1
  198. #define IR_MODEINFO             0x190
  199.  
  200. //#define WM_CONVERTREQUESTEX     0x0109
  201. #define WM_WNT_CONVERTREQUESTEX 0x0109 /* WM_CONVERTREQUESTEX: 109 for NT, 108 for OT */
  202. #define WM_CONVERTREQUEST       0x010A
  203. #define WM_CONVERTRESULT        0x010B
  204. #define WM_INTERIM              0x010C
  205.  
  206. #define WM_IMEKEYDOWN           0x290
  207. #define WM_IMEKEYUP             0x291
  208.  
  209.  
  210.  
  211.  
  212. //
  213. // UNDETERMINESTRING structure for IR_UNDETERMINE
  214. //
  215. typedef struct tagUNDETERMINESTRUCT {
  216.     DWORD    dwSize;
  217.     UINT     uDefIMESize;
  218.     UINT     uDefIMEPos;
  219.     UINT     uUndetTextLen;
  220.     UINT     uUndetTextPos;
  221.     UINT     uUndetAttrPos;
  222.     UINT     uCursorPos;
  223.     UINT     uDeltaStart;
  224.     UINT     uDetermineTextLen;
  225.     UINT     uDetermineTextPos;
  226.     UINT     uDetermineDelimPos;
  227.     UINT     uYomiTextLen;
  228.     UINT     uYomiTextPos;
  229.     UINT     uYomiDelimPos;
  230. } UNDETERMINESTRUCT,*PUNDETERMINESTRUCT,NEAR *NPUNDETERMINESTRUCT,FAR *LPUNDETERMINESTRUCT;
  231.  
  232.  
  233. typedef struct tagSTRINGEXSTRUCT {
  234.     DWORD    dwSize;
  235.     UINT     uDeterminePos;
  236.     UINT     uDetermineDelimPos;
  237.     UINT     uYomiPos;
  238.     UINT     uYomiDelimPos;
  239. } STRINGEXSTRUCT,NEAR *NPSTRINGEXSTRUCT,FAR *LPSTRINGEXSTRUCT;
  240.  
  241. #ifdef __BORLANDC__
  242. #  include <poppack.h>
  243. #endif
  244.  
  245. #ifdef __cplusplus
  246. }
  247. #endif  /* __cplusplus */
  248.  
  249. #pragma option pop
  250. #endif // _IME_
  251.